<%@ page language="java" %>
<%@ page import="com.scalar.chiptrack.commons.Constants,
                com.scalar.chiptrack.commons.SessionKeys,
                com.scalar.chiptrack.users.User,
                com.scalar.chiptrack.users.Functionality,
                com.scalar.chiptrack.operations.packingslip.FinalInventoryData,
                com.scalar.chiptrack.utils.ConfigManager,
                com.scalar.chiptrack.utils.StringUtils"%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>

<chiptrack:checkLogon sourcePage="/packingSlip.do"/>
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>
<% User user1 = (User)session.getAttribute (SessionKeys.USER_KEY); %>
<html:html locale="true">
<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<style type="text/css">
a { text-decoration : none}
@page {
  size: landscape;
	}
}
</style>

<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type='text/css' rel='stylesheet'>
</HEAD>
<BODY bgColor='#ffffff' leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<!------ - body  starts  here ----------------->
<body>
<html:form name="packingSlipPrintForm" type="com.scalar.chiptrack.operations.packingslip.forms.packingSlipForm" action="/packingSlip.do">
<table border="0" width="90%" align="center">
    <logic:notEqual name="packingSlipPrintForm" property="status" value="<%=Constants.CUSTOMER_SHIPPING_STATUS_CANCELLED%>">
        <tr>
            <td width="90%" >
                <table width='50'align="right" background='<%=chipTracContext%>/jsp/includes/images/printer_icon_small.gif'>
                    <tr>
                        <td>
                            <a href="javascript:window.print();" title='Click here to print the Packing Slip'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
     </logic:notEqual>
</table>

<logic:iterate id="cShipLineItems" name="loadInnerOuterBoxById"  type="com.scalar.chiptrack.operations.packingslip.CustomerShippingLineItems" indexId="lineItemIdx1">
<%--    <bean:write name="lineItemIdx1" /> : <bean:write name="cShipLineItems" property="customerShippingLineItemId" />
    :  <bean:write name="cShipLineItems" property="totalTrays" />
    :  <bean:write name="cShipLineItems" property="totalInnerBoxes" />
    :  <bean:write name="cShipLineItems" property="totalOuterBoxes" />--%>
    <bean:define id="pulledQty" name="cShipLineItems" property="qtyPulled"/>

    <bean:define id="unitsPTrays" name="cShipLineItems" property="unitsPTrays" />
    <bean:define id="traysPInnerBoxes" name="cShipLineItems" property="traysPInnerBoxes"  />
    <bean:define id="innerPOuterBoxes" name="cShipLineItems" property="innerPOuterBoxes" />
    <%
		int sTotalQuantity = cShipLineItems.getQtyPulled();
		int sTotalTrays  = Integer.parseInt( cShipLineItems.getTotalTrays() + "" );
        int sTotInnerBox = Integer.parseInt( cShipLineItems.getTotalInnerBoxes() + "" );
        int sTotOuterBox = Integer.parseInt( cShipLineItems.getTotalOuterBoxes() + "" );

		if( sTotalTrays == 0 || sTotInnerBox == 0 || sTotOuterBox == 0  )
		{
	%>
	        <table class="NArialRS" border="1" width="60%"  border='0' bordercolor='#000000' cellspacing='0' align="center" bgcolor="#FFFFEE">
        <tr>
            <td align="center" class="NArialView">OuterBox Label</td>
        </tr>
        <tr>
            <td align="center">
                <table border = "0" cellspacing = "0" cellpadding = "0"  width="100%">
                    <tr>
                        <td width="25%" align="middle"><img src="<%=chipTracContext%>/jsp/includes/images/scalar_logo.jpg" height="60" width="100" border=0></td>
                        <td width="1%" ><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td>
                        <td width="74%"><font face="palatino linotype"  size="2">
                            <bean:write name="packingSlipPrintForm" property="clientInfo.clientName" />
                            <bean:write name="packingSlipPrintForm" property="labelClientAddressObjectFormatted" filter="false"/></font>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
        <tr>
            <td>
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tr>
                        <td width="11%" align="right" class="NArialR" >ShipTo:</td>
                        <td width="1%">&nbsp;</td>
                        <td width="74%"  class="NArialRS">
                            <logic:notEmpty name="packingSlipPrintForm" property="odm">
                                <bean:write name="packingSlipPrintForm" property="odm"/>
                            </logic:notEmpty>
                            <logic:empty name="packingSlipPrintForm" property="odm">
                                <logic:notEmpty name="packingSlipPrintForm" property="shippingAddressObject">
                                    <logic:notEqual name="packingSlipPrintForm" property="shippingAddressObject.contactPerson" value='<bean:write name="packingSlipPrintForm" property="customerName"/>'>
                                         <bean:write name="packingSlipPrintForm" property="customerName"/>
                                    </logic:notEqual>
                                </logic:notEmpty>
                                <logic:empty name="packingSlipPrintForm" property="shippingAddressObject">
                                     <bean:write name="packingSlipPrintForm" property="customerName"/>
                                </logic:empty>
                            </logic:empty>

                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td class="NArialRS"><bean:write name="packingSlipPrintForm" property="shippingAddressObjectFormatted" filter="false"/></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
        <tr>
            <td>
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tr>
                        <td width="22%" align="left" class="NArialR">&nbsp;&nbsp;Invoice No:</td>
                        <td width="27%" align="left" class="NArialRS"><bean:write name="packingSlipPrintForm" property="invNo"/></td>
                        <td width="1%">&nbsp;</td>
                        <td width="27%" align="left" class="NArialR">Purchase Order No:</td>
                        <td width="27%" align="left" class="NArialRS"><bean:write name="packingSlipPrintForm" property="customerPO"/></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td>
        </tr>
        <tr>
            <td>
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tr>
                        <td width="22%" align="left" class="NArialR">&nbsp;&nbsp;<bean:message key="label.mfgPartNumber"/>:</td>
                        <td width="27%" align="left" class="NArialRS"><bean:write name="cShipLineItems" property="part_Number"/></td>
                        <td width="1%">&nbsp;</td>
                        <td width="27%" align="left" class="NArialR"><bean:message key="label.customerPartNumber"/>:</td>
                        <td width="27%" align="left" class="NArialRS"><bean:write name="cShipLineItems" property="customer_Part_Number"/></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td>
        </tr>
        <tr>
            <td>
                <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
                    <tr>
                        <td width="7%" align="right" class="NArialR">&nbsp;&nbsp;Box :&nbsp;</td>
                        <td width="10%" class="NArialRS">&nbsp;of&nbsp;</td>
                        <td width="22%" class="NArialR">Box Quantity:&nbsp;</td>
                        <td width="7%" class="NArialRS">&nbsp;</td>
                        <td width="33%" align="left" class="NArialR">Country of Origin:&nbsp;</td>
                        <td width="14%" class="NArialRS"><bean:write name="cShipLineItems" property="madeInCountry"/></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <table>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
    </table>
	<%		
		}
		else
		{
			for( int i = 1 ; i < ( sTotOuterBox + 1 ) ; i++ )
			{
	%>
        <table class="NArialRS" border="1" width="60%"  border='0' bordercolor='#000000' cellspacing='0' align="center" bgcolor="#FFFFEE">
        <tr>
            <td align="center" class="NArialView">OuterBox Label</td>
        </tr>
        <tr>
            <td align="center">
                <table border = "0" cellspacing = "0" cellpadding = "0"  width="100%">
                    <tr>
                        <td width="25%" align="middle"><img src="<%=chipTracContext%>/jsp/includes/images/scalar_logo.jpg" height="60" width="100" border=0></td>
                        <td width="1%" ><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td>
                        <td width="74%"><font face="palatino linotype"  size="2">
                            <bean:write name="packingSlipPrintForm" property="clientInfo.clientName" />
                            <bean:write name="packingSlipPrintForm" property="labelClientAddressObjectFormatted" filter="false"/></font>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
        <tr>
            <td>
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tr>
                        <td width="11%" align="right" class="NArialR" >ShipTo:</td>
                        <td width="1%">&nbsp;</td>
                        <td width="74%"  class="NArialRS">
                            <logic:notEmpty name="packingSlipPrintForm" property="odm">
                                <bean:write name="packingSlipPrintForm" property="odm"/>
                            </logic:notEmpty>
                            <logic:empty name="packingSlipPrintForm" property="odm">
                                <logic:notEmpty name="packingSlipPrintForm" property="shippingAddressObject">
                                    <logic:notEqual name="packingSlipPrintForm" property="shippingAddressObject.contactPerson" value='<bean:write name="packingSlipPrintForm" property="customerName"/>'>
                                         <bean:write name="packingSlipPrintForm" property="customerName"/>
                                    </logic:notEqual>
                                </logic:notEmpty>
                                <logic:empty name="packingSlipPrintForm" property="shippingAddressObject">
                                     <bean:write name="packingSlipPrintForm" property="customerName"/>
                                </logic:empty>
                            </logic:empty>
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td class="NArialRS"><bean:write name="packingSlipPrintForm" property="shippingAddressObjectFormatted" filter="false"/></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
        <tr>
            <td>
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tr>
                        <td width="22%" align="left" class="NArialR">&nbsp;&nbsp;Invoice No:</td>
                        <td width="27%" align="left" class="NArialRS"><bean:write name="packingSlipPrintForm" property="invNo"/></td>
                        <td width="1%">&nbsp;</td>
                        <td width="27%" align="left" class="NArialR">Purchase Order No:</td>
                        <td width="27%" align="left" class="NArialRS"><bean:write name="packingSlipPrintForm" property="customerPO"/></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td>
        </tr>
        <tr>
            <td>
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tr>
                        <td width="22%" align="left" class="NArialR">&nbsp;&nbsp;<bean:message key="label.mfgPartNumber"/>:</td>
                        <td width="27%" align="left" class="NArialRS"><bean:write name="cShipLineItems" property="part_Number"/></td>
                        <td width="1%">&nbsp;</td>
                        <td width="27%" align="left" class="NArialR"><bean:message key="label.customerPartNumber"/>:</td>
                        <td width="27%" align="left" class="NArialRS"><bean:write name="cShipLineItems" property="customer_Part_Number"/></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td>
        </tr>
        <tr>
            <td>
                <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
                    <tr>
                        <td width="7%" align="right" class="NArialR">&nbsp;&nbsp;Box :&nbsp;</td>
                        <td width="10%" class="NArialRS"><%=i%>&nbsp;of&nbsp;<%=sTotOuterBox%></td>
                        <td width="22%" class="NArialR">Box Quantity:&nbsp;</td>
                        <td width="7%" class="NArialRS">
	<%
						try
						{
							if( i == sTotOuterBox )
							{
								out.println( sTotalQuantity - ( Integer.parseInt( unitsPTrays + "" )  * Integer.parseInt( traysPInnerBoxes + "" )  * Integer.parseInt( innerPOuterBoxes + "" ) ) * ( i - 1 ) );
							}
							else
							{
								out.println( Integer.parseInt( unitsPTrays + "" )  * Integer.parseInt( traysPInnerBoxes + "" )  * Integer.parseInt( innerPOuterBoxes + "" )  );
							}
						}
						catch( Exception e )
						{
							e.printStackTrace();
						}
	%>
                        </td>
                        <td width="33%" align="left" class="NArialR">Country of Origin:&nbsp;</td>
                        <td width="14%" class="NArialRS"><bean:write name="cShipLineItems" property="madeInCountry"/></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <table>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
    </table>
	<%  
			}  
		}
	%>
    <table>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
    </table>

    <%
		if( sTotalTrays == 0 || sTotInnerBox == 0 || sTotOuterBox == 0 )
		{
	%>
        <table border="1" width="60%"  border='1' bordercolor='#000000' cellspacing='0' bgcolor="#FFFFEE" align="center" cellpadding="0">
        <tr>
            <td  align="center" class="NArialView">InnerBox Label</td>
        </tr>
        <tr>
            <td  align="center">
                <table border = "0" cellspacing = "0" cellpadding = "0"  width="100%">
                    <tr>
                        <td width="25%" align="middle"><img src="<%=chipTracContext%>/jsp/includes/images/scalar_logo.jpg" height="60" width="100" border=0></td>
                        <td width="1%" ><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td>
                        <td width="74%"><font face="palatino linotype"  size="2">
                            <bean:write name="packingSlipPrintForm" property="clientInfo.clientName" />
                            <bean:write name="packingSlipPrintForm" property="labelClientAddressObjectFormatted" filter="false"/></font>
                        </td>
                    </tr>
                </table>
             </td>
        </tr>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
        <tr>
            <td >
                <table width="100%" cellpadding="0" cellspacing="0" align="center" border="0">
                    <tr>
                        <td width="24%" align="left" class="NArialR">&nbsp;&nbsp;<bean:message key="label.mfgPartNumber"/>:</td>
                        <td width="31%" class="NArialRS"><bean:write name="cShipLineItems" property="part_Number"/></td>
                        <td width="1%">&nbsp;</td>
                        <td width="15%" class="NArialR">RRMMCC:</td>
                        <td width="25%" class="NArialR">
                            <bean:define name="cShipLineItems" id="cslit_Id" property='customerShippingLineItemId' type="java.lang.Integer" />
                            <bean:write name="cShipLineItems" property="rrmmcc"/>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr><td>
        <logic:iterate id="inventoryData" name="cShipLineItems" property="innerAndOuterBoxList"  type="com.scalar.chiptrack.operations.packingslip.FinalInventoryData" offset="0">
               <bean:define id="sLotId" name="inventoryData" property="lotId" />
               <bean:define id="sQuantityPull" name="inventoryData" property="quantityPull" />
               <bean:define id="sLotNumber" name="inventoryData" property="lotNumber" />
               <bean:define id="sDateCode" name="inventoryData" property="dateCode" />
        </logic:iterate>
        <img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15>
        </td>
        </tr>
        <tr>
            <td >
                <table width="100%" cellpadding="0" cellspacing="0" align="center" border="0">
                    <tr>
                        <td width="20%" align="left" class="NArialR">&nbsp;&nbsp;Lot No:&nbsp;</td>
                        <td width="35%" align="left" class="NArialRS">
                            <logic:notEqual  name="sLotNumber" value=""><bean:write name="sLotNumber" /></logic:notEqual>
                        </td>
                        <td width="1%">&nbsp;</td>
                        <td width="15%" class="NArialR">MS Level:</td>
                        <td width="25%" class="NArialRS"><bean:write name="cShipLineItems" property="msLevel"/></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
        <tr>
            <td >
                <table width="100%" cellpadding="0" cellspacing="0" align="center" border="0">
                    <tr>
                        <td width="20%" align="left" class="NArialR">&nbsp;&nbsp;Date Code:&nbsp;</td>
                        <td width="35%" class="NArialRS">
                            <logic:notEqual  name="sDateCode" value="">
                            <bean:write name="sDateCode" />
                            </logic:notEqual>&nbsp;
                        </td>
                        <td width="1%">&nbsp;</td>
                        <td width="15%" class="NArialR">Safe Hours:</td>
                        <td width="25%" class="NArialRS"><bean:write name="cShipLineItems" property="safeHours"/></td>
                    </tr>
                </table>
            </td>
        </tr>
       <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
        <tr>
            <td >
                <table width="100%" cellpadding="0" cellspacing="0" align="center" border="0" >
                    <tr>
                        <td width="20%" align="left" class="NArialR">&nbsp;&nbsp;Quantity:&nbsp;</td>
                        <td width="35%" class="NArialRS">&nbsp;</td>
                        <td width="1%">&nbsp;</td>
                        <td width="15%" class="NArialR">Seal Date:</td>
                        <td width="25%" class="NArialRS"><bean:write name="cShipLineItems" property="sealDate"/></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
    </table>
    <table>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
    </table>

	<%
		}
		else
		{
	        for( int i = 1; i < ( sTotInnerBox + 1 ); i++ )
		    {   
	%>
        <table border="1" width="60%"  border='1' bordercolor='#000000' cellspacing='0' bgcolor="#FFFFEE" align="center" cellpadding="0">
        <tr>
            <td  align="center" class="NArialView">InnerBox Label</td>
        </tr>
        <tr>
            <td  align="center">
                <table border = "0" cellspacing = "0" cellpadding = "0"  width="100%">
                    <tr>
                        <td width="25%" align="middle"><img src="<%=chipTracContext%>/jsp/includes/images/scalar_logo.jpg" height="60" width="100" border=0></td>
                        <td width="1%" ><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td>
                        <td width="74%"><font face="palatino linotype"  size="2">
                            <bean:write name="packingSlipPrintForm" property="clientInfo.clientName" />
                            <bean:write name="packingSlipPrintForm" property="labelClientAddressObjectFormatted" filter="false"/></font>
                        </td>
                    </tr>
                </table>
             </td>
        </tr>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
        <tr>
            <td >
                <table width="100%" cellpadding="0" cellspacing="0" align="center" border="0">
                    <tr>
                        <td width="24%" align="left" class="NArialR">&nbsp;&nbsp;<bean:message key="label.mfgPartNumber"/>:</td>
                        <td width="31%" class="NArialRS"><bean:write name="cShipLineItems" property="part_Number"/></td>
                        <td width="1%">&nbsp;</td>
                        <td width="15%" class="NArialR">RRMMCC:</td>
                        <td width="25%" class="NArialR">
                            <bean:define name="cShipLineItems" id="cslit_Id" property='customerShippingLineItemId' type="java.lang.Integer" />
                            <bean:write name="cShipLineItems" property="rrmmcc"/>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr><td>
        <logic:iterate id="inventoryData" name="cShipLineItems" property="innerAndOuterBoxList"  type="com.scalar.chiptrack.operations.packingslip.FinalInventoryData" offset="0">
               <bean:define id="sLotId" name="inventoryData" property="lotId" />
               <bean:define id="sQuantityPull" name="inventoryData" property="quantityPull" />
               <bean:define id="sLotNumber" name="inventoryData" property="lotNumber" />
               <bean:define id="sDateCode" name="inventoryData" property="dateCode" />
        </logic:iterate>
        <img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15>
        </td>
        </tr>
        <tr>
            <td >
                <table width="100%" cellpadding="0" cellspacing="0" align="center" border="0">
                    <tr>
                        <td width="20%" align="left" class="NArialR">&nbsp;&nbsp;Lot No:&nbsp;</td>
                        <td width="35%" align="left" class="NArialRS">
                            <logic:notEqual  name="sLotNumber" value=""><bean:write name="sLotNumber" /></logic:notEqual>
                        </td>
                        <td width="1%">&nbsp;</td>
                        <td width="15%" class="NArialR">MS Level:</td>
                        <td width="25%" class="NArialRS"><bean:write name="cShipLineItems" property="msLevel"/></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
        <tr>
            <td >
                <table width="100%" cellpadding="0" cellspacing="0" align="center" border="0">
                    <tr>
                        <td width="20%" align="left" class="NArialR">&nbsp;&nbsp;Date Code:&nbsp;</td>
                        <td width="35%" class="NArialRS">
                            <logic:notEqual  name="sDateCode" value="">
                            <bean:write name="sDateCode" />
                            </logic:notEqual>&nbsp;
                        </td>
                        <td width="1%">&nbsp;</td>
                        <td width="15%" class="NArialR">Safe Hours:</td>
                        <td width="25%" class="NArialRS"><bean:write name="cShipLineItems" property="safeHours"/></td>
                    </tr>
                </table>
            </td>
        </tr>
       <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
        <tr>
            <td >
                <table width="100%" cellpadding="0" cellspacing="0" align="center" border="0" >
                    <tr>
                        <td width="20%" align="left" class="NArialR">&nbsp;&nbsp;Quantity:&nbsp;</td>
                        <td width="35%" class="NArialRS">
    <%
						try
						{
							if(  i == sTotInnerBox  )
							{
								out.println( sTotalQuantity - ( Integer.parseInt( unitsPTrays + "" )  * Integer.parseInt( traysPInnerBoxes + "" ) * ( i - 1 ) )  );
							}
							else
							{
								out.println( Integer.parseInt( unitsPTrays + "" )  * Integer.parseInt( traysPInnerBoxes + "" ) );
							}
						}
						catch( Exception e )
						{
							e.printStackTrace();
						}
	%>
                        &nbsp;
                        </td>
                        <td width="1%">&nbsp;</td>
                        <td width="15%" class="NArialR">Seal Date:</td>
                        <td width="25%" class="NArialRS"><bean:write name="cShipLineItems" property="sealDate"/></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
    </table>
    <table>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
    </table>
    <%  
			}
		}  
	%>

    <table>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=15></td></tr>
    </table>
</logic:iterate>
</html:form>
</body>
</html:html>